package com.example.springboot0811.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LogController {

    //1.得到日志文件
    private static Logger log = LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/log")
    public void log() {
        String msg = "Friday";
        log.info("info ->" + msg);
        log.trace("trace ->" + msg);
        log.warn("warn ->" + msg);
        log.error("error ->" + msg);
        log.debug("debug ->" + msg);

    }
}
